package util;

import org.apache.commons.codec.digest.DigestUtils;

import java.util.UUID;

public class MD5Util {

    //加密
    public static String md5(String code){
        return DigestUtils.md5Hex(code);
    }

    //获取盐值
    public static String getSalt(){
        return UUID.randomUUID().toString().substring(0,8);
    }


}
